//auto gen by paipai.java.augogen ver 154
//author floatman
#ifndef _COMPANYDAO_COMPANY_H_
#define _COMPANYDAO_COMPANY_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_companydao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <vector>
#include <set>
#include <map>
#include "erp/company/ddo/companyinfoddo_company.h"
#include "erp/company/ddo/companyfilterddo_company.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
using namespace c2cent::library::wtimeelf;
HEADER_SELF_DEFINE_END

namespace erp
{
namespace company
{
namespace dao
{

#define COMPANYDAO_SERVICE_VERSION "ERP_COMPANY_DAO___COMPANYDAO__SERVICE_VERSION__1.0 2013-10-24 15:49:22"
const std::string COMPANYDAO_SERVICE_NOUSE = COMPANYDAO_SERVICE_VERSION;

SERVICE class CCompanyDao : public ICompanyDao{
public:
		CCompanyDao(enum DeployMethod method = DEPLOY_STANDALONE);
		~CCompanyDao();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    通过SysNos获取用户企业信息
	 *
	 */
	EXPORT(0xc0661801) uint32_t GetCompanyByIds(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint32_t> & setCompanysysNoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint32_t,erp::company::ddo::CCompanyInfoDdo> & mapCompanyInfo,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    获取用户企业信息
	 *
	 */
	EXPORT(0xc0661802) uint32_t GetCompany(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::company::ddo::CCompanyFilterDdo& oCompanyFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::company::ddo::CCompanyInfoDdo> & vecCompanyInfo,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    写入&更新用户企业信息
	 *
	 */
	EXPORT(0xc0661803) uint32_t AddAndUpdateCompany(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::company::ddo::CCompanyInfoDdo& oCompanyInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    逻辑删除用户企业信息
	 *
	 */
	EXPORT(0xc0661804) uint32_t DeleteCompany(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::company::ddo::CCompanyInfoDdo& oCompanyInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
private:
		std::string m_strMachineKey;
        std::string m_strSource;
        std::string m_strClientIP;
        uint32_t m_dwSceneId;
        uint32_t m_dwOperatorUin;

        static CItilGroup m_oGetCompany;//用户企业查询ITIL上报对象
        static CItilGroup m_oGetCompanyByIds;//用户企业ByIds查询ITIL上报对象
        static CItilGroup m_oAddAndUpdateCompany;//新增更新用户企业信息ITIL上报对象
        static CItilGroup m_oDeleteCompany;//逻辑删除用户企业信息ITIL上报对象
SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};

}
}
}

#endif /* _COMPANYDAO_COMPANY_H_ */
